<!DOCTYPE html>
<html lang="en" ng-app="app">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>手机版正式报名</title>
    <link href="css/mui.css" rel="stylesheet" type="text/css" />
    <link href="css/index.css" rel="stylesheet" type="text/css" />
    <style>
    .mui-toast-container{
        bottom:50%;
    }
    .mui-card{
        margin:0;
        padding:10px;
    }
    </style>
</head>

<body ng-controller="ctrl">
    <header class="mui-bar mui-bar-nav">
        <i class=" mui-icon mui-icon-left-nav mui-pull-left" ng-click="pageBack()"></i>
        <h1 class="mui-title">正式报名</h1>
    </header>
    <div class="mui-content">
        <form class="mui-input-group" name="form" novalidate ng-submit="postForm()">
            <div class="page1" ng-show="pageCurrent==1">
                <div class="mui-input-row">
                    <label>姓名<span>*</span></label>
                    <input type="text" name="name" ng-model="name" class="mui-input-clear" placeholder="姓名"  id="stuname" required>
                </div>
                <div class="mui-input-row">
                    <label class="mui-navigate-right" href="#">性别</label>
                    <select name="sex"  id="stusex" required>
                        <option value="">请选择</option>
                        <option value="1">男</option>
                        <option value="0">女</option>
                    </select>
                </div>
                <div class="mui-input-row">
                    <label>联系电话<span>*</span></label>
                    <input type="text" name="phone" ng-model="phone" class="mui-input-clear" placeholder="联系电话" required  ng-pattern="/^1[0-9]{10}$/">
                </div>
                <!--身份证号码-->
                <div class="mui-input-row">
                    <label>身份证号<span>*</span></label>
                    <input type="text" name="cardId" ng-model="cardId" class="mui-input-clear" placeholder="身份证号" required ng-pattern="/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/" >
                </div>
                <div class="mui-input-row">
                    <label>推荐人姓名<span>*</span></label>
                    <input type="text" name="inviteUser" ng-model="inviteUser" class="mui-input-clear" id="institutions" placeholder="推荐人姓名" required>
                </div>
                <div class="mui-input-row">
                    <label>推荐人代码<span>*</span></label>
                    <input type="text" name="inviteCode" ng-model="inviteCode" class="mui-input-clear" placeholder="推荐人代码" required>
                </div>
                <p>备&nbsp;&nbsp;注&nbsp;&nbsp;带<span>*</span>的选项为必填项，其他特殊要求请查看当年考试政策</p>
                <div class="mui-button-row">
                        <button type="button" class="mui-btn mui-btn-primary" ng-click="pageNext(2)">下一步</button>
                </div>
            </div>
            <div class="page2" ng-show="pageCurrent==2">
                <!--报考层次-->
                <div class="mui-input-row">
                    <label class="mui-navigate-right" href="#">报考层次<span>*</span></label>
                    <select name="levelId" ng-model="levelId" id="apply">
                        <option value="">请选择</option>
                        <option value="0">高起专</option>
                        <option value="1">专升本</option>
                        <!--<option value="2">本科二学历</option>-->
                    </select>
                </div>
                <!--报考院校-->
                <div class="mui-input-row">
                    <label class="mui-navigate-right">报考院校<span>*</span></label>
                    <!--<input type="text" name="orderSchool1"  class="mui-input-clear" id="institutions" placeholder="志愿一" required>-->
                    <select name="orderSchool1" ng-model="orderSchool1" required >
                        <option value="">请选择报考院校志愿一</option>
                        <option value="{{item.school}}" ng-repeat="item in majorData" ng-if="item.level==levelId">{{item.school}}</option>
                    </select>
                </div>
                 <div class="mui-input-row" ng-if="show1" style="cursor:pointer" ng-click="viewSchool(orderSchool1)">
                    <label class=""><span></span></label>
                    <div style="height:37px;line-height:37px;color:#e4393c">点击查看院校招生信息</div>
                </div>
                <div class="mui-input-row">
                    <label class="mui-navigate-right"></label>
                    <select name="orderSchool2" ng-model="orderSchool2" ng-selected="schoolSelect2(orderSchool2,2)">
                        <option value="">请选择报考院校志愿二</option>
                        <option value="{{item.school}}" ng-repeat="item in majorData" ng-if="item.level==levelId">{{item.school}}</option>
                    </select>  
                </div>
                <div class="mui-input-row" ng-if="show2" style="cursor:pointer" ng-click="viewSchool(orderSchool2)">
                    <label class=""><span></span></label>
                    <div style="height:37px;line-height:37px;color:#e4393c">点击查看院校招生信息</div>
                </div>
                <!--专业-->
                <div class="mui-input-row">
                    <label class="mui-navigate-right">专业<span>*</span></label>
                    <!--<input type="text" name="orderMajor1" ng-model="orderMajor1" class="mui-input-clear" id="profession1" placeholder="志愿一" required>-->
                    <select name="orderMajor1" ng-model="orderMajor1" ng-repeat="item in majorData" ng-if="item.school==orderSchool1" required>
                        <option value="">请选择报考专业志愿一</option>
                        <option value="{{list}}" ng-repeat="list in item.major">{{list}}</option>
                    </select>
                </div>
                <div class="mui-input-row">
                    <label class="mui-navigate-right"></label>
                    <!--<input type="text" name="orderMajor2" class="mui-input-clear" id="profession1" placeholder="志愿二" >-->
                    <select name="orderMajor2" ng-model="orderMajor2" ng-repeat="item in majorData" ng-if="item.school==orderSchool2">
                        <option value="">请选择报考专业志愿二</option>
                        <option value="{{list}}" ng-repeat="list in item.major">{{list}}</option>
                    </select>
                </div>
                <div class="mui-input-row">
                    <label class="mui-navigate-right">校区选择<span>*</span></label>
                    <select name="siteId" ng-model="siteId" id="apply" >
                        <option value="">请选择校区</option>
                        <option ng-repeat="item in data.sites" ng-if="item.eName!='www'" value="{{item.id}}">{{item.name}}</option>
                    
                        <!--<option value="2">本科二学历</option>-->
                    </select>
                </div>
                <p>备&nbsp;&nbsp;注&nbsp;&nbsp;带<span>*</span>的选项为必填项，其他特殊要求请查看当年考试政策</p>
                <div class="mui-button-row">
                        <button type="button" class="mui-btn mui-btn-primary" ng-click="pageNext(3)">下一步</button>
                </div>
            </div>
            <div class="page4" ng-if="pageCurrent==4">
                <div class="mui-card" ng-if="schoolName=='浙江商业职业技术学院'">
                    <!--页眉，放置标题-->
                    <div class="mui-card-header">浙江商业职业技术学院</div>
                    <!--内容区-->
                    <div class="mui-card-content">
                       <ul class="mui-table-view">
                            <li class="mui-table-view-cell">
                                <p>开设专业：会计、工商企业管理、国际贸易实务、市场营销、物流管理、电子商务</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>专业类别：文史类</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>入学科目：语文、数学、英语</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学制：2.5-5年</p>
                            </li>
                             <li class="mui-table-view-cell">
                                <p>报名费：300元</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学费：8100/2.5年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学杂费：1500元/3年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>往届分数：110</p>
                            </li>
                        </ul>
                    </div>
                  
                </div>
                <div class="mui-card" ng-if="schoolName=='浙江经济职业技术学院'">
                    <!--页眉，放置标题-->
                    <div class="mui-card-header">浙江经济职业技术学院</div>
                    <!--内容区-->
                    <div class="mui-card-content">
                        <ul class="mui-table-view">
                            <li class="mui-table-view-cell">
                                <p>开设专业：计算机信息管理、工商企业管理、市场营销、电子商务、会计、国际经济与贸易</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>专业类别：文史类</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>入学科目：语文、数学、英语</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学制：2.5-5年</p>
                            </li>
                             <li class="mui-table-view-cell">
                                <p>报名费：300元</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学费：6750元/2.5年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学杂费：1500元/3年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>往届分数：110</p>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="mui-card" ng-if="schoolName=='浙江工商大学'">
                    <!--页眉，放置标题-->
                    <div class="mui-card-header">浙江工商大学</div>
                    <!--内容区-->
                    <div class="mui-card-content">
                        <ul class="mui-table-view">
                            <li class="mui-table-view-cell">
                                <p>开设专业：法学、金融学、工商管理、旅游管理、市场营销、会计学、物流管理、行政管理、人力资源管理、国际经济与贸易</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>专业类别：经管类</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>入学科目：政治、英语、高数</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学制：2.5-5年</p>
                            </li>
                             <li class="mui-table-view-cell">
                                <p>报名费：300元</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学费：8910元/2.5年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学杂费：1500元/3年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>往届分数：120</p>
                            </li>
                        </ul>
                    </div>
                    <!--页脚，放置补充信息或支持的操作-->
                    <div class="mui-card-footer">页脚</div>
                </div>
                <div class="mui-card" ng-if="schoolName=='浙江理工大学'">
                    <!--页眉，放置标题-->
                    <div class="mui-card-header">浙江理工大学</div>
                    <!--内容区-->
                    <div class="mui-card-content">
                        <ul class="mui-table-view">
                            <li class="mui-table-view-cell">
                                <p>开设专业：电气工程及其自动化、电子信息工程、服装设计与工程、机械电子工程、机械设计制造及其自动化 、计算机科学与技术、土木工程</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>专业类别：工科类</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>入学科目：政治、英语、高数</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学制：2.5-5年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>报名费：300元</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学费：9900元/2.5年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>学杂费：1500元/3年</p>
                            </li>
                            <li class="mui-table-view-cell">
                                <p>往届分数：120</p>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="page3" ng-show="pageCurrent==3">
                <!--身份证正面-->
                <div class="mui-row">
                    <label for="" class="mui-col-sm-4">身份证正面<span>*</span></label>
                    <div class="photo mui-col-sm-8">
                        <img src="" alt="">
                        <input type="file" id="picture1" name="file1"  onchange="angular.element(this).scope().fileChange(this)"  >
                        <input type="hidden" class="picture1" name="picture1"  >
                    </div>
                </div>
            
                <div class="mui-row">
                    <label for="" class="mui-col-sm-4">身份证反面<span>*</span></label>
                    <div class="photo mui-col-sm-8">
                        <img src="" alt="">
                        <input type="file" id="picture2" name="file2" onchange="angular.element(this).scope().fileChange(this)">
                        <input type="hidden" class="picture2" name="picture2" >
                    </div>
                </div>
                <div class="mui-row">
                    <label for="" class="mui-col-sm-4">两寸蓝底半身照<span>*</span></label>
                    <div class="photo mui-col-sm-8">
                        <img src="" alt="">
                        <input type="file" id="picture3" name="file3" onchange="angular.element(this).scope().fileChange(this)">
                        <input type="hidden" class="picture3" name="picture3" >
                    </div>
                </div>
                <div class="mui-row">
                    <label for="" class="mui-col-sm-4">毕业证书</label>
                    <div class="photo mui-col-sm-8">
                        <img src="" alt="">
                        <input type="file" id="picture4" name="file4" onchange="angular.element(this).scope().fileChange(this)">
                        <input type="hidden" class="picture4" name="picture4" >
                    </div>
                </div>
                <div class="mui-row">
                    <label for="" class="mui-col-sm-4">相关工作证明</label>
                    <div class="photo mui-col-sm-8">
                        <img src="" alt="">
                        <input type="file" id="picture8" name="file8" onchange="angular.element(this).scope().fileChange(this)" >
                        <input type="hidden" class="picture8" name="picture8" >
                    </div>
                </div>
                <p>备&nbsp;&nbsp;注&nbsp;&nbsp;带<span>*</span>的选项为必填项，其他特殊要求请查看当年考试政策</p>
                <p>咨询热线：0571-86872178</p>
                <div class="mui-button-row">
                    <button type="submit" class="mui-btn mui-btn-primary">立即报名</button>
                </div>
            </div>
            <!--<div class="mui-input-row">
                <label>出生年月<span>*</span></label>
                <input type="text" name="birthday" class="mui-input-clear" id="stubirth" placeholder="出生年月" required>
            </div>-->
            <!--性别-->
           
            <!--联系电话-->
            
            <!--民族-->
            <!--<div class="mui-input-row">
                <label>民族<span>*</span></label>
                <input class="mui-input-clear" placeholder="民族" type="text" name="nation" required>
            </div>-->
            
            <!--政治面貌-->
            <!--<div class="mui-input-row">
                <label  href="#">政治面貌<span>*</span></label>
                <input type="text" class="mui-input-clear" placeholder="政治面貌"  name="political" id="political" required>
            </div>-->
            <!--通讯地址-->
            <!--<div class="mui-input-row">
                <label>通讯地址<span>*</span></label>
                <input type="text" name="address" class="mui-input-clear" placeholder="通讯地址" id="stuaddr">
            </div>-->
            <!--电子邮箱-->
            <!--<div class="mui-input-row">
                <label>电子邮箱</label>
                <input type="text" >
                <input type="text" class="mui-input-clear" placeholder="电子邮箱" name="email" id="stumail">
            </div>-->
            <!--邮政编码-->
            <!--<div class="mui-input-row">
                <label>邮政编码<span>*</span></label>
                <input type="text" name="zipCode" class="mui-input-clear" placeholder="邮政编码">
            </div>-->
            <!--优惠加分-->
            <!--<div class="mui-input-row">
                <label class="mui-navigate-right" href="#">优惠加分</label>
                <select name="addScore" class="form-control" id="discount">
                    <option value="">请选择</option>
                    <option value="0">年龄大于25周岁</option>
                    <option value="1">少数民族</option>
                </select>
            </div>-->
            <!--工作单位-->
            <!--<div class="mui-input-row">
                <label>工作单位</label>
                <input type="text" name="company" class="mui-input-clear" placeholder="工作单位" id="unit">
            </div>-->
            
            <!--工作年月-->
            <!--<div class="mui-input-row">
                <label>工作年月</label>
                <input type="text" name="companyDate" class="mui-input-clear" placeholder="工作年月" id="years">
            </div>-->
            <!--考区-->
            <!--<div class="mui-input-row">
                <label class="mui-navigate-right" href="#">考区<span>*</span></label>
                 <select name="examZoneId"  id="text">
                    <option value="">请选择</option>
                    <option value="{{item.id}}" ng-repeat="item in enrollData.examZones">{{item.name}}</option>
                </select>
            </div>-->
            <!--职位类别-->
            <!--<div class="mui-input-row">
                <label class="mui-navigate-right" href="#">职位类别</label>
                <select name="work" id="staff" class="form-control">
                    <option value="">请选择职位类别</option>
                    <option value="0">不便分类的其他从业人员</option>
                    <option value="1">国家机关、党群组织、企业、事业单位负责人</option>
                    <option value="2">军人</option>
                    <option value="3">专业技术人员</option>
                    <option value="4">办事人员和有关人员</option>
                    <option value="5">商业、服务业人员 </option>
                    <option value="6">农、林、牧、渔、水利业生产人员</option>
                    <option value="7">生产、运输设备操作人员及有关人员</option>
                </select>
            </div>-->
            <!--毕业日期-->
            <!--<div class="mui-input-row">
                <label>毕业日期<span>*</span></label>
                <input name="graduateDate" type="text" class="mui-input-clear" placeholder="毕业日期" id="graduation" required>
            </div>-->
            
            
            <!--<div class="mui-input-row">
                <label></label>
                <input type="text" name="orderSchool3" class="mui-input-clear" id="institutions" placeholder="志愿三">
            </div>-->
            
            <!--<div class="mui-input-row">
                <label></label>
                <input type="text" name="orderMajor3" class="mui-input-clear" id="profession1" placeholder="志愿三" >
            </div>-->
            <!--毕业学校-->
            <!--<div class="mui-input-row">
                <label>毕业学校<span>*</span></label>
                <input type="text" name="graduateSchool" class="mui-input-clear" placeholder="毕业学校" required>
            </div>-->
            <!--毕业证号-->
            <!--<div class="mui-input-row">
                <label>毕业证号</label>
                <input type="text" name="graduateCode" class="mui-input-clear" placeholder="毕业证号">
            </div>-->
            <!--文化程度-->
            <!--<div class="mui-input-row">
                <label class="mui-navigate-right" href="#">文化程度<span>*</span></label>
                <select name="education" class="form-control" id="text" required>
                    <option value="">请选择</option></option>
                    <option value="0">高中毕业</option>
                    <option value="1">中专毕业</option>
                    <option value="2">职业高中毕业</option>
                    <option value="3">技工学校毕业</option>
                    <option value="4">同等学历（高中）</option>
                    <option value="5">高职（专科）</option>
                    <option value="6">学历教育毕业 </option>
                    <option value="7">本科（含）以上学历教育毕业</option>
                </select>
            </div>-->
            <!--大专毕业证书-->
            <!--<div class="mui-row">
                <label for="" class="mui-col-sm-4">大专毕业证书<br>(本科必要)</label>
                <div class="photo mui-col-sm-8">
                    <img src="" alt="">
                    <input type="file" name="picture4">
                </div>
            </div>-->
            <!--高中毕业证书-->
            <!--<div class="mui-row">
                <label for="" class="mui-col-sm-4">高中毕业证书<br>(专科必要)</label>
                <div class="photo mui-col-sm-8">
                    <img src="" alt="">
                    <input type="file" name="picture5">
                </div>
            </div>-->
       
            <!--<div class="mui-row">
                <label for="" class="mui-col-sm-4">暂住证<br>(外地必要)</label>
                <div class="photo mui-col-sm-8">
                    <img src="" alt="">
                    <input type="file" onchange="angular.element(this).scope().fileChange(this)" name="picture6">
                </div>
            </div>-->
            <!--护士证-->
            <!--<div class="mui-row">
                <label for="" class="mui-col-sm-4">护士证<br>(护理专业)</label>
                <div class="photo mui-col-sm-8">
                    <img src="" alt="">
                    <input type="file" name="picture7">
                </div>
            </div>-->
            <!--相关工作证明-->
            <!--<div class="mui-row">
                <label for="" class="mui-col-sm-4">相关工作证明</label>
                <div class="photo mui-col-sm-8">
                    <img src="" alt="">
                    <input type="file" name="picture8" onchange="angular.element(this).scope().fileChange(this)" ng-model="picture8" required>
                </div>
            </div>-->
            <!--<p>备&nbsp;&nbsp;注&nbsp;&nbsp;带<span>*</span>的选项为必填项，其他特殊要求请查看当年考试政策</p>
            <div class="mui-button-row">
                <button type="submit" class="mui-btn mui-btn-primary">立即报名</button>
            </div>-->
        </form>
    </div>
    <script src="/public/libs/jquery.min.js"></script>
    <script src="/public/libs/jquery.form.js"></script>
    <script src="/public/libs/ajaxfileupload.js"></script>
    <script src="/public/libs/angular-1.5.3/angular.min.js"></script>
    <script src="/public/libs/mui/mui.min.js"></script>
    
    <script>
        angular.module("app",[])
        .controller("ctrl",function($scope,$http,$interval){
            $scope.pageCurrent=1;
            $http({
                method:"get",
                url:"/index"
            }).success(function(data){
                // data.schools.push({id:"0",name:"其他学校"});
                console.log(data);
                $scope.data=data;
                // $scope.enrollData=data;
            })
            $scope.show1=false;
            $scope.show2=false;
            $scope.$watch("levelId",function(newVal,oldVal){
                if(newVal!=oldVal){
                    $scope.show1=false;
                    $scope.show2=false;
                }
            })
            $scope.$watch("orderSchool1",function(newVal,oldVal){
                if(newVal){
                    $scope.show1=true;
                }else{
                    $scope.show1=false;
                }
            })
            $scope.$watch("orderSchool2",function(newVal,oldVal){
                if(newVal){
                    $scope.show2=true;
                }else{
                    $scope.show2=false;
                }
            })
            $scope.viewSchool=function(name){
                $scope.pageCurrent=4;
                $scope.schoolName=name;
                console.log(name);
            }
            //下一步按钮
            $scope.pageNext=function(i){
                $scope.pageCurrent=i;
            }
            //上一步按钮
            $scope.pageBack=function(){
                if($scope.pageCurrent==1){
                    $scope.pageCurrent=1
                }else if($scope.pageCurrent==4){
                    $scope.pageCurrent=2
                }else{
                    $scope.pageCurrent--;
                }
            }
            $scope.status=0;
            $scope.fileChange=function(e){
                $scope.status++;
                 var className=$(e).attr("id")
                console.log($(e));
                var url = URL.createObjectURL($(e)[0].files[0]);
                $(e).prev().attr('src', url);
                $.ajaxFileUpload({
                    url: "/Upload/uploadImg",
                    fileElementId: $(e).attr("id"),
                    type: 'post',
                    dataType: 'text',
                    secureuri: false,
                    success: function (data) {
                        $scope.status--;
                        className="."+className;
                        $(className).val(data);
                    },
                    error: function (data, status, e) {
                    }
                });
            }
            $scope.postForm=function(){
            //   console.log($("input[name='picture1']")[0].files.length)
                if($scope.form.name.$error.required){
                    mui.toast("姓名不能空缺，请重新编辑");
                    return;
                }else if($scope.form.phone.$error.required){
                    mui.toast("联系电话不能空缺，请重新编辑");
                     return;
                }else if($scope.form.cardId.$error.required){
                    mui.toast("身份证号不能空缺，请重新编辑");
                     return;
                }else if($scope.form.levelId.$error.required){
                    mui.toast("报考层次不能空缺，请重新编辑");
                     return;
                }else if($scope.form.orderSchool1.$error.required){
                    mui.toast("报考院校志愿一不能空缺，请重新编辑");
                     return;
                }else if($scope.form.orderMajor1.$error.required){
                    mui.toast("报考专业志愿一不能空缺，请重新编辑");
                     return;
                }else if($scope.form.inviteUser.$error.required){
                    mui.toast("推荐人不能空缺，请重新编辑");
                     return;
                }
                else if($scope.form.inviteCode.$error.required){
                    mui.toast("推荐人代码不能空缺，请重新编辑");
                     return;
                }
                // else if(!$("input[name='picture1']")[0].files.length){
                //     mui.toast("身份证正面照不能空缺，请重新编辑");
                //      return;
                // }
                // else if(!$("input[name='picture2']")[0].files.length){
                //     mui.toast("身份证背面照不能空缺，请重新编辑");
                //      return;
                // }
                // else if(!$("input[name='picture3']")[0].files.length){
                //     mui.toast("两寸蓝底半身照不能空缺，请重新编辑");
                //      return;
                // }
                // else if(!$("input[name='picture4']")[0].files.length){
                //     mui.toast("毕业证书不能空缺，请重新编辑");
                //      return;  
                // }
                // else if($scope.form.phone.$error.pattern){
                //     mui.toast("联系电话格式不正确，请重新编辑");
                //      return;  
                // }
                else if($scope.form.cardId.$error.pattern){
                    mui.toast("身份证号码不正确，请重新编辑");
                     return;  
                }
                // mui.toast("资料上传中，请稍后！",{duration:"long",type:"div"})
                console.log($scope.status);
                if(!$scope.status){
                     $("form").ajaxSubmit({
                        type: "post",
                        dataType: "json",
                        url:"/student/submit",
                        success:function(data){
                            console.log(data);
                            if(data.code==0){
                                mui.closePopups();
                                mui.toast(data.msg)
                            }
                        },
                        fail:function(data){
                        }
                    })
                }else{
                    var timer=$interval(function(){
                        if(!$scope.status){
                            $interval.cancel(timer);
                            $("form").ajaxSubmit({
                                type: "post",
                                dataType: "json",
                                url:"/student/submit",
                                success:function(data){
                                    console.log(data);
                                    if(data.code==0){
                                         mui.closePopups();
                                        mui.toast(data.msg)
                                    }
                                },
                                fail:function(data){
                                }
                            })
                        }
                    },200)
                }
               
            }
            $scope.majorData=[
                {school:"浙江商业职业技术学院","level":"0","major":["会计","工商企业管理","国际贸易实务","市场营销","物流管理","电子商务"]},
                {school:"浙江经济职业技术学院","level":"0","major":["计算机信息管理","工商企业管理","市场营销","电子商务","会计","国际经济与贸易"]},
                {school:"浙江工商大学","level":"1","major":["法学","金融学","工商管理","旅游管理","市场营销","会计学","物流管理","行政管理","人力资源管理","国际经济与贸易"]},
                {school:"浙江理工大学","level":"1","major":["电气工程及其自动化","电子信息工程","服装设计与工程","机械电子工程","机械设计制造及其自动化","计算机科学与技术","土木工程"]},
            ]
            console.log($scope.majorData);
        })

















    </script>




</body>

</html>